<template>
  <div>
    <p style="margin-left: 500px">问诊详情</p>
    <div v-for="item in form">
      <p>{{item.createTime}}</p>
      <p>医生:{{item.coupon}}</p>
      <p><img :src="item.url" width="100px" height="100px"></p>
      <div v-for="item1 in item.consultDetail">
        <p>{{item1.createTime}}</p>
        <p>用户:{{item1.coupon}}</p>
        <p><img :src="item1.url" width="100px" height="100px"></p>
      </div>
    </div>
    <el-button style="margin-left: 20px" @click="toEncounterRecord">返回</el-button>
  </div>
</template>

<script >
import {ReplyById} from "@/api/Consult";

export default {
  data() {
    return {
      form:[],
      from:{},
}
  },
  created() {
    this.from = this.$route.query.from;
    this.detail();
  },
  methods: {
    toEncounterRecord(){
      this.$router.push({path:'/EncounterRecord'})
    },
    detail(){
      ReplyById(this.from).then(res =>{
        this.form=res.data
      })
    },
  }
}
</script>

<style>
p{
  margin-left: 20px;
}
</style>
